UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'De8mzP/a7ftBuFiZA3Pv6txEG/bbzTC8JpVdDbSF9UY=' 
WHERE 
  key_id = 'b32995213f1849e907e9a6252ce2f5ed6aa2b71da8a8148f7c79cf5038357c2b' 
  AND (
    token = 'De8mzP/a7ftBuFiZA3Pv6txEG/bbzTC8JpVdDbSF9UY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033