UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'UV3NPZ8sJBbCxCujB4TsJLkuLwkGM3LoPqygiWz679w=' 
WHERE 
  key_id = '0cc213c0bc1e1f01f3cdd0c7e7201122f40797ae0286faab9ff73cedfd70b7fd' 
  AND (
    token = 'UV3NPZ8sJBbCxCujB4TsJLkuLwkGM3LoPqygiWz679w=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00038