UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '489trkvgjpFyVpKTjq8gPjLBdJZFLu4fMAoo+13PHlg='
WHERE
key_id = '7e2224b9c6babb8adbe498a48ddd14bc4e08a21b20861d9a679cb0700e16c833'
AND (
token = '489trkvgjpFyVpKTjq8gPjLBdJZFLu4fMAoo+13PHlg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)