UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '5MKAvqNFZ7Q/JGFs00iBr75n4/Jx5UGK0zXKOHygFx8=' 
WHERE 
  key_id = '705fd967fb5bec061c3db0e61288aea461070578b74121043c7432acf88fb3f3' 
  AND (
    token = '5MKAvqNFZ7Q/JGFs00iBr75n4/Jx5UGK0zXKOHygFx8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034