UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rUd6bSIvfrx/NLlqouvR6yr/gxhn529+Mf+ywtqt+8w='
WHERE
key_id = '81016655a2e43ef991f9111347cbb494ce1c65aeb5e99d375aabd51211d0eea7'
AND (
token = 'rUd6bSIvfrx/NLlqouvR6yr/gxhn529+Mf+ywtqt+8w='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)