UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'sitdZINQMBN2EV12k9UWvTUGLvVJ3tLigialDB9W6kA='
WHERE
key_id = 'c91e5f6c46c1f439fe3cbf22fb7cc2bb25a0048400d2a70abd61d47b6830e588'
AND (
token = 'sitdZINQMBN2EV12k9UWvTUGLvVJ3tLigialDB9W6kA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)