UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jlk+qIsQ6H1sxjcUNvBqnw4LvNpE/QMdRa665GsB874='
WHERE
key_id = '873919b5887e51c5ace0780ff3d1ed96425d723a7092ff6d9663013cbf61fae6'
AND (
token = 'jlk+qIsQ6H1sxjcUNvBqnw4LvNpE/QMdRa665GsB874='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)