UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'zE0mqElPHFxcvu8V6BDqaMFmwZ+nq9DvP2qo3PtfBvs=' 
WHERE 
  key_id = '5a856a711345b0a0fba7f6d7d3bef534806f5c0c72ee2627188cf22b8548eae2' 
  AND (
    token = 'zE0mqElPHFxcvu8V6BDqaMFmwZ+nq9DvP2qo3PtfBvs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033