UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Hh444Ej8OcYh1W7G2dOB0XE+dbw2m2qcAL/uAK0EbMs=' 
WHERE 
  key_id = 'b34146d596e3516a4cb55f6db5887375537c3ec1f492353055da2653d4f21418' 
  AND (
    token = 'Hh444Ej8OcYh1W7G2dOB0XE+dbw2m2qcAL/uAK0EbMs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030