UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Mxyq5/XrbHkPBAubzlduYtIB2vK9ac560H/wCZoJTWI='
WHERE
key_id = 'af9609ca7e5b3a4fe81ae66a11f8f18d7b3491de5204d9109fad7eca8b4da54c'
AND (
token = 'Mxyq5/XrbHkPBAubzlduYtIB2vK9ac560H/wCZoJTWI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)