UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'TzaxH6Fga+gElmCHK3DN2MkANEz+IKEmgK+RmcBB8j0=' 
WHERE 
  key_id = '14275be2c71f86f59127bc306a6a02c69c8b523d87fb11bc33f14d61dd0ca22f' 
  AND (
    token = 'TzaxH6Fga+gElmCHK3DN2MkANEz+IKEmgK+RmcBB8j0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00075