UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'q2PCPWhx1aBED+RPdd2z4LPXVOpP+20vfSVKf7SUoeM='
WHERE
key_id = '92cf7c188185a3853e919c7bb43a07f7d0e5b1ae4ab874abad13e19ec6b0928f'
AND (
token = 'q2PCPWhx1aBED+RPdd2z4LPXVOpP+20vfSVKf7SUoeM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)