UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+uV4CZo4+nCDN2/VFX2ARTNE2CbTP3y1pprTa0hDVvA=' 
WHERE 
  key_id = '0d3fd18b22c7593af5889c3125d771e5f9bb47a7e0c8bf89d15ec01dba29e475' 
  AND (
    token = '+uV4CZo4+nCDN2/VFX2ARTNE2CbTP3y1pprTa0hDVvA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030