UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2Px+q839ZrvI8SYVhuXAYrfydxeiDf7B41cyNg1UFgM='
WHERE
key_id = '94d1857bce832d6134b87e07e862567e754fc8ba1f87890cc7a15fa26f6474b9'
AND (
token = '2Px+q839ZrvI8SYVhuXAYrfydxeiDf7B41cyNg1UFgM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)