UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Ee1z+8erBfd7PvaksCTupCklFiOtvUREKgl/lERnIEQ='
WHERE
key_id = '84f97512c2daf9427e924d64f358387961e1b96918acc97344c90c36cada026c'
AND (
token = 'Ee1z+8erBfd7PvaksCTupCklFiOtvUREKgl/lERnIEQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)