UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Pkgrde+t/isYaQkvcWRrSJhQhBskVltHqQp5gnoaW10='
WHERE
key_id = '43ec4f6176389a3d82b64a1d17e4b8b9e68a2e082a757a7e9fae8790e9c1ff2c'
AND (
token = 'Pkgrde+t/isYaQkvcWRrSJhQhBskVltHqQp5gnoaW10='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)