UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'ZD1ZGV99EykBNOVq5TV57x/hTX571/LMl5Tm7kTZg0U=' 
WHERE 
  key_id = '46c915ec2501d59d7b6ab64a311c0ffa9f8de98fc0c001f31189c3464ffac748' 
  AND (
    token = 'ZD1ZGV99EykBNOVq5TV57x/hTX571/LMl5Tm7kTZg0U=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00026