UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '10bcxSs1bzFcb5M4OhGDKdHog2zZl3GN/hy41pTL61M='
WHERE
key_id = 'c3cbf73dd31eb55ca50cab504286133a6ea11c3a3b3f63f998cab5b10fa431bd'
AND (
token = '10bcxSs1bzFcb5M4OhGDKdHog2zZl3GN/hy41pTL61M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)