UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'YXH3i43PhhHCraMNZQvkXEb/uFRfHieOCU53o8pGopo='
WHERE
key_id = '486efa6d4660ed262f010e0a32379e837a9ec54d4c4fa49560669074c1e7c05f'
AND (
token = 'YXH3i43PhhHCraMNZQvkXEb/uFRfHieOCU53o8pGopo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)