UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'fYSrPic/IiMgeudsd4VNpvb15E9CMybAAjvwOoh2ISA='
WHERE
key_id = '85a075832c5d3f7e35433237f16313c80c60885c61e501e025e19490874f16c7'
AND (
token = 'fYSrPic/IiMgeudsd4VNpvb15E9CMybAAjvwOoh2ISA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)