UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'lzGxfUbbNK/2ePs61sx6NUJ3Ek3F3KYUgOs2a5BYgDc='
WHERE
key_id = '9dbd53cfb35346d0a0ace70b652cc5c00c79275f2054ea7825c1531e0c186191'
AND (
token = 'lzGxfUbbNK/2ePs61sx6NUJ3Ek3F3KYUgOs2a5BYgDc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)