UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '3lm2uYOaA9NSgDdHkLWdCH3Q9Lw8/tOrdrsVeyFcDbI=' 
WHERE 
  key_id = 'c91680fa15dcfb368a9a58c515392fcabdc78ccb5435c6eb372ae6af3335ff27' 
  AND (
    token = '3lm2uYOaA9NSgDdHkLWdCH3Q9Lw8/tOrdrsVeyFcDbI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00022