UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '9uR6k7ZCCGdWhFbaaMXlva5Za0FpFPMVTMBDf4/rCZQ=' 
WHERE 
  key_id = '63f004a7c5e1577e0349fc9f7525788ed1d9e7a2ca9bf97860f5f6d52257af63' 
  AND (
    token = '9uR6k7ZCCGdWhFbaaMXlva5Za0FpFPMVTMBDf4/rCZQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00041