UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'EW/kqaXis8S6Po3wphPaQ43xWbVs/H1ZQkPyjjpIR/U=' 
WHERE 
  key_id = '3bfb82d5c9b3c459e503575ced8ba3705fa8e2b44e76c1632973818866b7a5de' 
  AND (
    token = 'EW/kqaXis8S6Po3wphPaQ43xWbVs/H1ZQkPyjjpIR/U=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00022