UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '8KUMJSTox8mpqiSkigg/rYQbY5/oLdM7EMUWvvZqWKk=' 
WHERE 
  key_id = '309df593a2f23b5abfd4bed8b33025a2739ea6090fc2c77f3910506e35a8c1fe' 
  AND (
    token = '8KUMJSTox8mpqiSkigg/rYQbY5/oLdM7EMUWvvZqWKk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020