UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'jeL5WyoXSmDfta0k8MzAQtTU9bgUbh/WG80vd6X7YO8=' 
WHERE 
  key_id = 'e2ed56f50f4c259fdd8a895721a3c9c17fe32c49a1fa8acf98974d42b5e148ea' 
  AND (
    token = 'jeL5WyoXSmDfta0k8MzAQtTU9bgUbh/WG80vd6X7YO8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00047