UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'ngaaB26HgRGVeJHma6rH/kYnn7Se5CQo0nWzRgoKqjY=' 
WHERE 
  key_id = '37970468479112e7a222a3fa8ff7fd165feffa5ec625cd28648f56181c0637a6' 
  AND (
    token = 'ngaaB26HgRGVeJHma6rH/kYnn7Se5CQo0nWzRgoKqjY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00041