UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'GaOOf7Bf4H01G0TYhYQ1zoTEV+Jpl/7flUj7C0fC/bQ=' 
WHERE 
  key_id = '8ba4a56154aae0f6367fac09f3d8e7261ee84b25a6f8267b3f02ada84b2dd5d7' 
  AND (
    token = 'GaOOf7Bf4H01G0TYhYQ1zoTEV+Jpl/7flUj7C0fC/bQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00040