UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'kglqwaaex8BdNuMq5/IVpVWPXKAADpBZepgpV5XJmeM='
WHERE
key_id = '26cdf6f31ea8503e3fc2a9dbbdd3032e6547529f0544256dea4cc65ea2a924cb'
AND (
token = 'kglqwaaex8BdNuMq5/IVpVWPXKAADpBZepgpV5XJmeM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)