UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '0bOka59sANS/m1F9rHWCKBkYythOap0SrPYSiLhyagA='
WHERE
key_id = '76b19a0e265904fbadaf0485eecb3519679af9e6848c10c30a8c44261641b9f0'
AND (
token = '0bOka59sANS/m1F9rHWCKBkYythOap0SrPYSiLhyagA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)