UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '72OCrTt8AJgId7GlXzgWQn4YbvAb997CqEPYaaYbTdY=' 
WHERE 
  key_id = '8411469d47fc3b1c8098db2d85fda5d4f26e278e236a9bf121d58fbad54687ee' 
  AND (
    token = '72OCrTt8AJgId7GlXzgWQn4YbvAb997CqEPYaaYbTdY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00015