UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'rkZOCqOGt/jK4gmmSO848zXn63Epb0AKhIM0XmAKblM=' 
WHERE 
  key_id = 'e9032f556fda99545fe22154a431e9264a99044fea9d190bf6cd2d73be2420e9' 
  AND (
    token = 'rkZOCqOGt/jK4gmmSO848zXn63Epb0AKhIM0XmAKblM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027