UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'azZ+G8vPtcB9FanfQJ/yDQeAZ3X+8NjPnO/daZgOJVM='
WHERE
key_id = 'ddc75b514e8159be5ad230b2f36bd1aaa91b062d3dbe4772b0d02add5bda4d43'
AND (
token = 'azZ+G8vPtcB9FanfQJ/yDQeAZ3X+8NjPnO/daZgOJVM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)