UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'vcRGPX/oZ9ZzOTLw+nYX0QQG9gjYP1vL/fjDaEZOGP0=' 
WHERE 
  key_id = 'fde41ee1cdee5031ebedb00101d13a276ffb23e2e18c6da6423ec2562ef26b27' 
  AND (
    token = 'vcRGPX/oZ9ZzOTLw+nYX0QQG9gjYP1vL/fjDaEZOGP0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027