UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'YhTyX9XRkQgr3NJ5gKWqoeFNb5NqR8+did73GM8YEvY=' 
WHERE 
  key_id = '2448559c52639f4ba2633198a57f89364a7c2e6409c477503c8384318ef98ad3' 
  AND (
    token = 'YhTyX9XRkQgr3NJ5gKWqoeFNb5NqR8+did73GM8YEvY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00019