UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'yZwEhcWwUOfGnPT4SE0glQ0FMMR0uJ4ZzAg0b/FBHxM=' 
WHERE 
  key_id = 'df68ef43198e1b1f8eeae8056e637c1ac181699c35800ae37742fb57dca53cb5' 
  AND (
    token = 'yZwEhcWwUOfGnPT4SE0glQ0FMMR0uJ4ZzAg0b/FBHxM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00113