UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/rp3D1E+J3Wl8mhUEDySPxBL6QlN+kjk8wRaE4PI/IY=' 
WHERE 
  key_id = '08e0528e5de0b7b70ac9ba693f466182f212ab60bc0a5c1dc2b6514439b87e90' 
  AND (
    token = '/rp3D1E+J3Wl8mhUEDySPxBL6QlN+kjk8wRaE4PI/IY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00049