UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'CFIP0XJdGVYwM8iSFqlaqPBOScfjRougW4/2FTi0hFc='
WHERE
key_id = 'd67d3262c7bb40ef73bb60795fecb9da48eabec186bdc576c6fba20423fd203f'
AND (
token = 'CFIP0XJdGVYwM8iSFqlaqPBOScfjRougW4/2FTi0hFc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)