UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ec7ww2NsLXsQ0B6Z23AKvrWnE+cbgGLAyZoWYMCM/qk='
WHERE
key_id = '9ab3875012c6d7dca99b89a6801be4668520c8ff0eeef2bbd191f6d1921bd151'
AND (
token = 'ec7ww2NsLXsQ0B6Z23AKvrWnE+cbgGLAyZoWYMCM/qk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)