UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1v3523UJeWG2EjxX6ekYRTUb/2QKyXsD6kAdgUhqwnI='
WHERE
key_id = '7433a2d9a8154070dcfa2250a81f3873eb728e28c3d753aca0e550e0de5cc741'
AND (
token = '1v3523UJeWG2EjxX6ekYRTUb/2QKyXsD6kAdgUhqwnI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)