UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'zmcAqFw6l/mWT/MxO2pzC7fH/4q5xAdvPamNaznF1ow=' 
WHERE 
  key_id = '81220378e41b62c31921b7ebe8068209467c1e3eaa684392917b8700ed872048' 
  AND (
    token = 'zmcAqFw6l/mWT/MxO2pzC7fH/4q5xAdvPamNaznF1ow=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00047