UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '8ssIKSnNf16UFZGWGVFpeEkYX5WcpJEpKmDpegsM5xY='
WHERE
key_id = 'eb06a3b8ef5d73ee2d31621962cd761f06dc95def845511648a966c93be9d35a'
AND (
token = '8ssIKSnNf16UFZGWGVFpeEkYX5WcpJEpKmDpegsM5xY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)