UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'mPeVwiapCr1eQjStDFCoxN2AjPWar7/V4Cdg/PyP1mM='
WHERE
key_id = '514b795446a728bed3c1cf48db6d0a353fa9d171da91b1ff9a7bacf5dd9b6f19'
AND (
token = 'mPeVwiapCr1eQjStDFCoxN2AjPWar7/V4Cdg/PyP1mM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)