UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'JWDjgQdCbwkGpJ+J7G9X4y4sd2ZDzcaufTrCEpnC5+k=' 
WHERE 
  key_id = '85b4206275ddbe9756ae69534038b24a2ec0c388a851f1559fcf5024c23247d6' 
  AND (
    token = 'JWDjgQdCbwkGpJ+J7G9X4y4sd2ZDzcaufTrCEpnC5+k=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030