UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'BMJzOfeEgVNyfiMyIvX5NhUA7JhrKihQm18HJA/wWaE='
WHERE
key_id = 'abaabe1eb4dcc185c9206eb7f0f7bdab64cdd9b1719e476a9e6aded071249bbf'
AND (
token = 'BMJzOfeEgVNyfiMyIvX5NhUA7JhrKihQm18HJA/wWaE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)