UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'rEjPCvU217phb7f+Lk3Qoz1sBiF4+PviVQDg+bmLoFs=' 
WHERE 
  key_id = '0af92ca227248a0771753ec38ed904f8c7a0ddaf6334cf32d105316d67a36cf0' 
  AND (
    token = 'rEjPCvU217phb7f+Lk3Qoz1sBiF4+PviVQDg+bmLoFs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00021