UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GIUXBqnlOKtfV2wSDc4S5d+3vTnFJhvc6PUYgVY0TFE='
WHERE
key_id = '448ed18330d291be0f5f2be325a5d4db4f4c84dc8cb02eacdd0a223d538f463d'
AND (
token = 'GIUXBqnlOKtfV2wSDc4S5d+3vTnFJhvc6PUYgVY0TFE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)