UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'mjDZI8aLWZOVYWce1iJRNr9rOvCGwQpeHlVN9w65yJA=' 
WHERE 
  key_id = '3ab9f3799d0ebee4664a97175aa157d765290f11461adeeaa9ba762a4fb20aca' 
  AND (
    token = 'mjDZI8aLWZOVYWce1iJRNr9rOvCGwQpeHlVN9w65yJA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00025