UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'hO3lMpPiS6Q7kOtR/P1JkfbJOPRhsJtcwlE2ANkpxJg=' 
WHERE 
  key_id = 'feb15fb5e1b2b02f6b95f922cc4cbe401f98dbc36170ef033a821014e8c3d8cf' 
  AND (
    token = 'hO3lMpPiS6Q7kOtR/P1JkfbJOPRhsJtcwlE2ANkpxJg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00054