UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Q2E6Rfavo+HIglAC0sc5lmhydnNXL3y9LWwA9wSei9I=' 
WHERE 
  key_id = 'f3f84b302679deec19f9ea23a03e6296dc71dc7e32bf7783d502f4b93910da16' 
  AND (
    token = 'Q2E6Rfavo+HIglAC0sc5lmhydnNXL3y9LWwA9wSei9I=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00041