UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'IHvbIxy/byU3GZeBg+DThbqmDG8rZo51v3a1VQ/Lbuw='
WHERE
key_id = '284992d73ac91fc9d4f7577350ca6c2ecbb0909aaca981ec3949805a84d651aa'
AND (
token = 'IHvbIxy/byU3GZeBg+DThbqmDG8rZo51v3a1VQ/Lbuw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)