UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MkqWhl8qv0U/vwPXlNXTIxP2Cq12ILr3SEdycSXsm9E='
WHERE
key_id = '35a7ce25b4ab8203dd02cbfe5edc412f921e2d1fcfc2c73c1d05946b7136fe72'
AND (
token = 'MkqWhl8qv0U/vwPXlNXTIxP2Cq12ILr3SEdycSXsm9E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)