UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'e2ohG6CiWMZAknNt65andB3+id+oJaZZy4Gnzyvku10=' 
WHERE 
  key_id = 'ed701efcb40e2f40efba65025affb0dd06631fbc09e34fb813eec50b980ab1a5' 
  AND (
    token = 'e2ohG6CiWMZAknNt65andB3+id+oJaZZy4Gnzyvku10=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00080