UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '2xVQGSb7PPmPk7FX6yYQyKmWvJNsk44mYBrbFWoGsl0=' 
WHERE 
  key_id = '60678f4b5da18b2498002a96fda7e4e1673ce4d94d4a7fadc79dac8bddfc7742' 
  AND (
    token = '2xVQGSb7PPmPk7FX6yYQyKmWvJNsk44mYBrbFWoGsl0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035