UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'aLWlfxSnuaErIYiBsugDV2NlVBdjIPRzMmmy1/So7XM='
WHERE
key_id = '3d2df7239ea18be39c8954beaadbdb4fb2834b60ea120ee26686ad02c47c6c6b'
AND (
token = 'aLWlfxSnuaErIYiBsugDV2NlVBdjIPRzMmmy1/So7XM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)