UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+JLgPwSoTfU/nduiFB/3Qr7Rm8M6C2VRDUlk3LkYVLs=' 
WHERE 
  key_id = '0b39606efc5881fd475254a5b7db23f0f3a6d442e7937f20a66cd566fbb3a970' 
  AND (
    token = '+JLgPwSoTfU/nduiFB/3Qr7Rm8M6C2VRDUlk3LkYVLs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00055