UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '4ZSskYtj45qIDF/5jCnvkSxMq0YBTyzpYbVd3xeY17U=' 
WHERE 
  key_id = '493fd3d43611b9db7e472fb42bac4844f0a7d40e5bf71c1bb82927c17a856a2e' 
  AND (
    token = '4ZSskYtj45qIDF/5jCnvkSxMq0YBTyzpYbVd3xeY17U=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00036