UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '1iBowSSR3CmXf3fsTatyc/nYlFuuxlP8moPaNCY7fDw=' 
WHERE 
  key_id = '1c281bf323893bacd05d06aad2e6da326be7baa9a9ab6b7720ebcbdaefff21cb' 
  AND (
    token = '1iBowSSR3CmXf3fsTatyc/nYlFuuxlP8moPaNCY7fDw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00018