UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'fYLGskgGLiXq1iPtj/Iwqc/GWAd86M57TzCF61qKJyM=' 
WHERE 
  key_id = '139d2a5f974699019893bbc13bc00fdf96ea13a6674dc445ce580d5d6eb1a0d4' 
  AND (
    token = 'fYLGskgGLiXq1iPtj/Iwqc/GWAd86M57TzCF61qKJyM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00022